<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="keywords" content="Hexo Theme Redefine">
    
    <meta name="author" content="xiaoeryu">
    <!-- preconnect -->
    <link rel="preconnect" href="https://fonts.googleapis.com">
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>

    
    <!--- Seo Part-->
    
    <link rel="canonical" href="https://xiaoeeyu.github.io/2024/02/29/分组密码-aes/"/>
    <meta name="robots" content="index,follow">
    <meta name="googlebot" content="index,follow">
    <meta name="revisit-after" content="1 days">
    
    
    
        
        <meta name="description" content="本章主要是学习AES如何实现，如何对java中的AES方法进行hook，以及定位so文件中的AES 这里以AES-128为例，会对明文分组进行10轮迭代运算，加密的第1轮到第9轮的函数一样，包括4个操作：字节替换、行位移、列混合和轮密钥加。最后一轮迭代不执行行列混合。另外，在第一轮迭代之前，先将明文和原始密钥进行一次异或加密操作。">
<meta property="og:type" content="article">
<meta property="og:title" content="分组密码-AES">
<meta property="og:url" content="https://xiaoeeyu.github.io/2024/02/29/%E5%88%86%E7%BB%84%E5%AF%86%E7%A0%81-AES/index.html">
<meta property="og:site_name" content="xiaoeryu">
<meta property="og:description" content="本章主要是学习AES如何实现，如何对java中的AES方法进行hook，以及定位so文件中的AES 这里以AES-128为例，会对明文分组进行10轮迭代运算，加密的第1轮到第9轮的函数一样，包括4个操作：字节替换、行位移、列混合和轮密钥加。最后一轮迭代不执行行列混合。另外，在第一轮迭代之前，先将明文和原始密钥进行一次异或加密操作。">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://xiaoeeyu.github.io/2024/02/29/%E5%88%86%E7%BB%84%E5%AF%86%E7%A0%81-AES/image-20240224151413242.png">
<meta property="og:image" content="https://xiaoeeyu.github.io/2024/02/29/%E5%88%86%E7%BB%84%E5%AF%86%E7%A0%81-AES/aes_details-17090032877272.jpg">
<meta property="og:image" content="https://xiaoeeyu.github.io/2024/02/29/%E5%88%86%E7%BB%84%E5%AF%86%E7%A0%81-AES/aes_enc_dec.png">
<meta property="og:image" content="https://xiaoeeyu.github.io/2024/02/29/%E5%88%86%E7%BB%84%E5%AF%86%E7%A0%81-AES/format,png.png">
<meta property="og:image" content="https://xiaoeeyu.github.io/2024/02/29/%E5%88%86%E7%BB%84%E5%AF%86%E7%A0%81-AES/%E5%9B%BE%E7%89%87-21.png">
<meta property="og:image" content="https://xiaoeeyu.github.io/2024/02/29/%E5%88%86%E7%BB%84%E5%AF%86%E7%A0%81-AES/format,png-17090177948337.png">
<meta property="og:image" content="https://xiaoeeyu.github.io/2024/02/29/%E5%88%86%E7%BB%84%E5%AF%86%E7%A0%81-AES/%E5%9B%BE%E7%89%87-22-1024x703.png">
<meta property="og:image" content="https://xiaoeeyu.github.io/2024/02/29/%E5%88%86%E7%BB%84%E5%AF%86%E7%A0%81-AES/%E5%9B%BE%E7%89%87-23.png">
<meta property="og:image" content="https://xiaoeeyu.github.io/2024/02/29/%E5%88%86%E7%BB%84%E5%AF%86%E7%A0%81-AES/%E5%9B%BE%E7%89%87-24-1024x704.png">
<meta property="og:image" content="https://xiaoeeyu.github.io/2024/02/29/%E5%88%86%E7%BB%84%E5%AF%86%E7%A0%81-AES/%E5%9B%BE%E7%89%87-25.png">
<meta property="og:image" content="https://xiaoeeyu.github.io/2024/02/29/%E5%88%86%E7%BB%84%E5%AF%86%E7%A0%81-AES/%E5%9B%BE%E7%89%87-26.png">
<meta property="og:image" content="https://xiaoeeyu.github.io/2024/02/29/%E5%88%86%E7%BB%84%E5%AF%86%E7%A0%81-AES/%E5%9B%BE%E7%89%87-27.png">
<meta property="og:image" content="https://xiaoeeyu.github.io/2024/02/29/%E5%88%86%E7%BB%84%E5%AF%86%E7%A0%81-AES/%E5%9B%BE%E7%89%87-28.png">
<meta property="og:image" content="https://xiaoeeyu.github.io/2024/02/29/%E5%88%86%E7%BB%84%E5%AF%86%E7%A0%81-AES/%E5%9B%BE%E7%89%87-29.png">
<meta property="og:image" content="https://xiaoeeyu.github.io/2024/02/29/%E5%88%86%E7%BB%84%E5%AF%86%E7%A0%81-AES/%E5%9B%BE%E7%89%87-30.png">
<meta property="og:image" content="https://xiaoeeyu.github.io/2024/02/29/%E5%88%86%E7%BB%84%E5%AF%86%E7%A0%81-AES/image-20240228231505592.png">
<meta property="og:image" content="https://xiaoeeyu.github.io/2024/02/29/%E5%88%86%E7%BB%84%E5%AF%86%E7%A0%81-AES/image-20240228231548507.png">
<meta property="og:image" content="https://xiaoeeyu.github.io/2024/02/29/%E5%88%86%E7%BB%84%E5%AF%86%E7%A0%81-AES/image-20240228231743503.png">
<meta property="og:image" content="https://xiaoeeyu.github.io/2024/02/29/%E5%88%86%E7%BB%84%E5%AF%86%E7%A0%81-AES/image-20240228232341555.png">
<meta property="og:image" content="https://xiaoeeyu.github.io/2024/02/29/%E5%88%86%E7%BB%84%E5%AF%86%E7%A0%81-AES/image-20240229113043350.png">
<meta property="article:published_time" content="2024-02-29T03:05:35.000Z">
<meta property="article:modified_time" content="2024-03-01T10:01:29.763Z">
<meta property="article:author" content="xiaoeryu">
<meta property="article:tag" content="Frida Hook">
<meta property="article:tag" content="AES">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://xiaoeeyu.github.io/2024/02/29/%E5%88%86%E7%BB%84%E5%AF%86%E7%A0%81-AES/image-20240224151413242.png">
    
    
    <!--- Icon Part-->
    <link rel="icon" type="image/png" href="/images/rabete.jpg" sizes="192x192">
    <link rel="apple-touch-icon" sizes="180x180" href="/images/rabete.jpg">
    <meta name="theme-color" content="#A31F34">
    <link rel="shortcut icon" href="/images/rabete.jpg">
    <!--- Page Info-->
    
    <title>
        
            分组密码-AES | xiaoeryu
        
    </title>

    
<link rel="stylesheet" href="/fonts/Chillax/chillax.css">


    <!--- Inject Part-->
    

    
<link rel="stylesheet" href="/css/style.css">


    
        
<link rel="stylesheet" href="/css/build/tailwind.css">

    

    
<link rel="stylesheet" href="/fonts/GeistMono/geist-mono.css">

    
<link rel="stylesheet" href="/fonts/Geist/geist.css">

    <!--- Font Part-->
    
    
    
    
    
    

    <script id="hexo-configurations">
    window.config = {"hostname":"xiaoeeyu.github.io","root":"/","language":"zh-CN","path":"search.xml"};
    window.theme = {"articles":{"style":{"font_size":"16px","line_height":1.5,"image_border_radius":"14px","image_alignment":"center","image_caption":false,"link_icon":true,"delete_mask":false,"title_alignment":"left","headings_top_spacing":{"h1":"3.2rem","h2":"2.4rem","h3":"1.9rem","h4":"1.6rem","h5":"1.4rem","h6":"1.3rem"}},"word_count":{"enable":true,"count":true,"min2read":true},"author_label":{"enable":true,"auto":false,"list":[]},"code_block":{"copy":true,"style":"mac","highlight_theme":{"light":"github","dark":"vs2015"},"font":{"enable":false,"family":null,"url":null}},"toc":{"enable":true,"max_depth":4,"number":false,"expand":true,"init_open":true},"copyright":{"enable":true,"default":"cc_by_nc_sa"},"lazyload":true,"pangu_js":false,"recommendation":{"enable":false,"title":"推荐阅读","limit":3,"mobile_limit":2,"placeholder":"/images/ball-0101.jpg","skip_dirs":[]}},"colors":{"primary":"#A31F34","secondary":null,"default_mode":"light"},"global":{"fonts":{"chinese":{"enable":false,"family":null,"url":null},"english":{"enable":false,"family":null,"url":null},"title":{"enable":false,"family":null,"url":null}},"content_max_width":"1000px","sidebar_width":"210px","hover":{"shadow":true,"scale":false},"scroll_progress":{"bar":false,"percentage":true},"website_counter":{"url":"https://busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js","enable":true,"site_pv":true,"site_uv":true,"post_pv":true},"single_page":true,"preloader":{"enable":false,"custom_message":null},"open_graph":true,"google_analytics":{"enable":false,"id":null}},"home_banner":{"enable":true,"style":"fixed","image":{"light":"/images/wallhaven-jxl31y.png","dark":"/images/wallhaven-o5762l.png"},"title":"XIAOERYU","subtitle":{"text":["明心见性，拨云见日","Don't wait, to create"],"hitokoto":{"enable":false,"show_author":false,"api":"https://v1.hitokoto.cn"},"typing_speed":100,"backing_speed":80,"starting_delay":500,"backing_delay":1500,"loop":true,"smart_backspace":true},"text_color":{"light":"#fff","dark":"#d1d1b6"},"text_style":{"title_size":"2.8rem","subtitle_size":"1.5rem","line_height":1.2},"custom_font":{"enable":false,"family":null,"url":null},"social_links":{"enable":true,"style":"default","links":{"github":"https://github.com/xiaoeeyu","instagram":null,"zhihu":null,"twitter":null,"email":"xiaoeryu@163.com"},"qrs":{"weixin":null}}},"plugins":{"feed":{"enable":false},"aplayer":{"enable":false,"type":"fixed","audios":[{"name":null,"artist":null,"url":null,"cover":null,"lrc":null}]},"mermaid":{"enable":false,"version":"9.3.0"}},"version":"2.8.2","navbar":{"auto_hide":false,"color":{"left":"#f78736","right":"#367df7","transparency":35},"width":{"home":"1200px","pages":"1000px"},"links":{"Home":{"path":"/","icon":"fa-regular fa-house"},"Archives":{"path":"/archives","icon":"fa-regular fa-archive"}},"search":{"enable":true,"preload":true}},"page_templates":{"friends_column":2,"tags_style":"blur"},"home":{"sidebar":{"enable":true,"position":"left","first_item":"menu","announcement":null,"show_on_mobile":true,"links":null},"article_date_format":"auto","excerpt_length":200,"categories":{"enable":true,"limit":3},"tags":{"enable":true,"limit":3}},"footerStart":"2022/8/17 11:45:14"};
    window.lang_ago = {"second":"%s 秒前","minute":"%s 分钟前","hour":"%s 小时前","day":"%s 天前","week":"%s 周前","month":"%s 个月前","year":"%s 年前"};
    window.data = {"masonry":false};
  </script>
    
    <!--- Fontawesome Part-->
    
<link rel="stylesheet" href="/fontawesome/fontawesome.min.css">

    
<link rel="stylesheet" href="/fontawesome/brands.min.css">

    
<link rel="stylesheet" href="/fontawesome/solid.min.css">

    
<link rel="stylesheet" href="/fontawesome/regular.min.css">

    
    
    
    
<meta name="generator" content="Hexo 6.3.0">
<style>.github-emoji { position: relative; display: inline-block; width: 1.2em; min-height: 1.2em; overflow: hidden; vertical-align: top; color: transparent; }  .github-emoji > span { position: relative; z-index: 10; }  .github-emoji img, .github-emoji .fancybox { margin: 0 !important; padding: 0 !important; border: none !important; outline: none !important; text-decoration: none !important; user-select: none !important; cursor: auto !important; }  .github-emoji img { height: 1.2em !important; width: 1.2em !important; position: absolute !important; left: 50% !important; top: 50% !important; transform: translate(-50%, -50%) !important; user-select: none !important; cursor: auto !important; } .github-emoji-fallback { color: inherit; } .github-emoji-fallback img { opacity: 0 !important; }</style>
</head>



<body>
	<div class="progress-bar-container">
	

	
	<span class="pjax-progress-bar"></span>
	<!--        <span class="swup-progress-icon">-->
	<!--            <i class="fa-solid fa-circle-notch fa-spin"></i>-->
	<!--        </span>-->
	
</div>

<main class="page-container" id="swup">

	

	<div class="main-content-container flex flex-col justify-between min-h-dvh">
		<div class="main-content-header">
			<header class="navbar-container px-6 md:px-12">
    <div class="navbar-content transition-navbar ">
        <div class="left">
            
                <a class="logo-image h-8 w-8 sm:w-10 sm:h-10 mr-3" href="/">
                    <img src="/images/rabete.jpg" class="w-full h-full rounded-sm">
                </a>
            
            <a class="logo-title" href="/">
                
                xiaoeryu
                
            </a>
        </div>

        <div class="right">
            <!-- PC -->
            <div class="desktop">
                <ul class="navbar-list">
                    
                        
                            

                            <li class="navbar-item">
                                <!-- Menu -->
                                <a class=""
                                   href="/"
                                        >
                                    <i class="fa-regular fa-house fa-fw"></i>
                                    首页
                                    
                                </a>

                                <!-- Submenu -->
                                
                            </li>
                    
                        
                            

                            <li class="navbar-item">
                                <!-- Menu -->
                                <a class=""
                                   href="/archives"
                                        >
                                    <i class="fa-regular fa-archive fa-fw"></i>
                                    归档
                                    
                                </a>

                                <!-- Submenu -->
                                
                            </li>
                    
                    
                        <li class="navbar-item search search-popup-trigger">
                            <i class="fa-solid fa-magnifying-glass"></i>
                        </li>
                    
                </ul>
            </div>
            <!-- Mobile -->
            <div class="mobile">
                
                    <div class="icon-item search search-popup-trigger"><i class="fa-solid fa-magnifying-glass"></i>
                    </div>
                
                <div class="icon-item navbar-bar">
                    <div class="navbar-bar-middle"></div>
                </div>
            </div>
        </div>
    </div>

    <!-- Mobile sheet -->
    <div class="navbar-drawer h-dvh w-full absolute top-0 left-0 bg-background-color flex flex-col justify-between">
        <ul class="drawer-navbar-list flex flex-col px-4 justify-center items-start">
            
                
                    

                    <li class="drawer-navbar-item text-base my-1.5 flex flex-col w-full">
                        
                        <a class="py-1.5 px-2 flex flex-row items-center justify-between gap-1 hover:!text-primary active:!text-primary text-2xl font-semibold group border-b border-border-color hover:border-primary w-full "
                           href="/"
                        >
                            <span>
                                首页
                            </span>
                            
                                <i class="fa-regular fa-house fa-sm fa-fw"></i>
                            
                        </a>
                        

                        
                    </li>
            
                
                    

                    <li class="drawer-navbar-item text-base my-1.5 flex flex-col w-full">
                        
                        <a class="py-1.5 px-2 flex flex-row items-center justify-between gap-1 hover:!text-primary active:!text-primary text-2xl font-semibold group border-b border-border-color hover:border-primary w-full "
                           href="/archives"
                        >
                            <span>
                                归档
                            </span>
                            
                                <i class="fa-regular fa-archive fa-sm fa-fw"></i>
                            
                        </a>
                        

                        
                    </li>
            

            
            
        </ul>

        <div class="statistics flex justify-around my-2.5">
    <a class="item tag-count-item flex flex-col justify-center items-center w-20" href="/tags">
        <div class="number text-2xl sm:text-xl text-second-text-color font-semibold">92</div>
        <div class="label text-third-text-color text-sm">标签</div>
    </a>
    <a class="item tag-count-item flex flex-col justify-center items-center w-20" href="/categories">
        <div class="number text-2xl sm:text-xl text-second-text-color font-semibold">14</div>
        <div class="label text-third-text-color text-sm">分类</div>
    </a>
    <a class="item tag-count-item flex flex-col justify-center items-center w-20" href="/archives">
        <div class="number text-2xl sm:text-xl text-second-text-color font-semibold">112</div>
        <div class="label text-third-text-color text-sm">文章</div>
    </a>
</div>
    </div>

    <div class="window-mask"></div>

</header>


		</div>

		<div class="main-content-body transition-fade-up">
			

			<div class="main-content">
				<div class="post-page-container flex relative justify-between box-border w-full h-full">
	<div class="article-content-container">

		<div class="article-title relative w-full">
			
			<div class="w-full flex items-center pt-6 justify-start">
				<h1 class="article-title-regular text-second-text-color tracking-tight text-4xl md:text-6xl font-semibold px-2 sm:px-6 md:px-8 py-3">分组密码-AES</h1>
			</div>
			
		</div>

		
		<div class="article-header flex flex-row gap-2 items-center px-2 sm:px-6 md:px-8">
			<div class="avatar w-[46px] h-[46px] flex-shrink-0 rounded-medium border border-border-color p-[1px]">
				<img src="/images/rabete.jpg">
			</div>
			<div class="info flex flex-col justify-between">
				<div class="author flex items-center">
					<span class="name text-default-text-color text-lg font-semibold">xiaoeryu</span>
					
					<span class="author-label ml-1.5 text-xs px-2 py-0.5 rounded-small text-third-text-color border border-shadow-color-1">Lv5</span>
					
				</div>
				<div class="meta-info">
					<div class="article-meta-info">
    <span class="article-date article-meta-item">
        <i class="fa-regular fa-pen-fancy"></i>&nbsp;
        <span class="desktop">2024-02-29 11:05:35</span>
        <span class="mobile">2024-02-29 11:05:35</span>
        <span class="hover-info">创建</span>
    </span>
    
        <span class="article-date article-meta-item">
            <i class="fa-regular fa-wrench"></i>&nbsp;
            <span class="desktop">2024-03-01 18:01:29</span>
            <span class="mobile">2024-03-01 18:01:29</span>
            <span class="hover-info">更新</span>
        </span>
    

    
        <span class="article-categories article-meta-item">
            <i class="fa-regular fa-folders"></i>&nbsp;
            <ul>
                
                
                    
                        
                        <li>
                            <a href="/categories/Android%E9%80%86%E5%90%91/">Android逆向</a>&nbsp;
                        </li>
                    
                    
                
                    
                        
                            <li>></li>
                        
                        <li>
                            <a href="/categories/Android%E9%80%86%E5%90%91/%E5%8A%A0%E5%AF%86%E8%A7%A3%E5%AF%86/">加密解密</a>&nbsp;
                        </li>
                    
                    
                
            </ul>
        </span>
    
    
        <span class="article-tags article-meta-item">
            <i class="fa-regular fa-tags"></i>&nbsp;
            <ul>
                
                    <li>
                        <a href="/tags/Frida-Hook/">Frida Hook</a>&nbsp;
                    </li>
                
                    <li>
                        | <a href="/tags/AES/">AES</a>&nbsp;
                    </li>
                
            </ul>
        </span>
    

    
    
    
    
        <span class="article-pv article-meta-item">
            <i class="fa-regular fa-eye"></i>&nbsp;<span id="busuanzi_value_page_pv"></span>
        </span>
    
</div>

				</div>
			</div>
		</div>
		

		


		<div class="article-content markdown-body px-2 sm:px-6 md:px-8 pb-8">
			<p>本章主要是学习AES如何实现，如何对java中的AES方法进行hook，以及定位so文件中的AES</p>
<p>这里以AES-128为例，会对明文分组进行10轮迭代运算，加密的第1轮到第9轮的函数一样，包括4个操作：字节替换、行位移、列混合和轮密钥加。最后一轮迭代不执行行列混合。另外，在第一轮迭代之前，先将明文和原始密钥进行一次异或加密操作。</p>
<span id="more"></span>

<img lazyload="" src="/images/loading.svg" data-src="/2024/02/29/%E5%88%86%E7%BB%84%E5%AF%86%E7%A0%81-AES/image-20240224151413242.png" class="" title="image-20240224151413242">

<h2 id="AES加解密理论"><a href="#AES加解密理论" class="headerlink" title="AES加解密理论"></a>AES加解密理论</h2><img lazyload="" src="/images/loading.svg" data-src="/2024/02/29/%E5%88%86%E7%BB%84%E5%AF%86%E7%A0%81-AES/aes_details-17090032877272.jpg" class="" title="img">

<img lazyload="" src="/images/loading.svg" data-src="/2024/02/29/%E5%88%86%E7%BB%84%E5%AF%86%E7%A0%81-AES/aes_enc_dec.png" class="" title="img">

<center>AES实现的原理图</center>

<p>AES的加解密，跟DES一样由左右两部分组成</p>
<p>左边是对明文（16字节）进行的一个10轮的迭代处理</p>
<blockquote>
<p>第一轮到第9轮每一轮都有四个操作：</p>
<p>AddRoundKey 为 异或<br>SubBytes 为 查表替换<br>ShiftRows 为 按字节循环左移<br>MixColumns 为 矩阵乘法</p>
</blockquote>
<p>右边是对密钥（16字节）进行编排，生成每一轮对应的子密钥。</p>
<h6 id="查表替换（字节替换、字节代换）"><a href="#查表替换（字节替换、字节代换）" class="headerlink" title="查表替换（字节替换、字节代换）"></a>查表替换（字节替换、字节代换）</h6><p>查表替换的主要功能是通过S盒完成一个字节到另一个字节的映射。本质上就是一个查表操作。有两个表一个是S盒一个是S盒逆。S盒用于提高密码算法的混淆性，S盒是快速判断AES加密算法的最有效的特征。</p>
<h3 id="AES算法流程分析"><a href="#AES算法流程分析" class="headerlink" title="AES算法流程分析"></a>AES算法流程分析</h3><p>这里介绍的是AES-128，也就是密钥的长度为128位，加密轮数为10轮</p>
<p>AES的加密公式为**C = E(K,P)**，在加密函数E中，会执行一个函数，并且执行10次这个轮函数，这个轮函数的前9次执行的操作是一样的，只有第10次有所不同。也就是说，一个明文分组会被加密10轮。AES的核心就是实现一轮中的所有操作。</p>
<h5 id="明文矩阵填充"><a href="#明文矩阵填充" class="headerlink" title="明文矩阵填充"></a>明文矩阵填充</h5><p>AES的处理单位是字节，128位的输入明文分组P和输入密钥K都被分成16个字节，分别记为P = P0 P1 … P15和 K = K0 K1 … K15。如，明文分组为P = abcdefghijklmnop,其中的字符a对应P0，p对应P15。一般地，明文分组用字节为单位的正方形矩阵描述，称为状态矩阵。在算法的每一轮中，状态矩阵的内容不断发生变化，最后的结果作为密文输出。该矩阵中字节的排列顺序为从上到下、从左至右依次排列。</p>
<img lazyload="" src="/images/loading.svg" data-src="/2024/02/29/%E5%88%86%E7%BB%84%E5%AF%86%E7%A0%81-AES/format,png.png" class="" title="state">

<center>状态矩阵</center>

<h5 id="密钥矩阵填充"><a href="#密钥矩阵填充" class="headerlink" title="密钥矩阵填充"></a>密钥矩阵填充</h5><p>类似地，128位密钥也是用字节为单位的矩阵表示，矩阵的每一列被称为1个32位比特字。通过密钥编排函数该密钥矩阵被扩展成一个44个字组成的序列W[0],W[1], … ,W[43]，该序列的前四个元素W[0],W[1],W[2],W[3]是原始密钥，用于加密运算中的初始密钥（下面介绍）；后面40个字分为10组，每组4个字（4x4x8 = 128bit）分别用于10轮加密运算中的轮密钥加。后面的10组密钥通过初始密钥进行密钥扩展得到。</p>
<img lazyload="" src="/images/loading.svg" data-src="/2024/02/29/%E5%88%86%E7%BB%84%E5%AF%86%E7%A0%81-AES/%E5%9B%BE%E7%89%87-21.png" class="" title="img">

<center>密钥矩阵</center>

<h5 id="加解密流程"><a href="#加解密流程" class="headerlink" title="加解密流程"></a>加解密流程</h5><p>AES加解密主要要以下几步操作，完整的加解密流程是通过循环以下步骤来完成的，具体如下图表示</p>
<ul>
<li>轮密钥加</li>
<li>字节替换</li>
<li>行位移</li>
<li>列混合</li>
</ul>
<img lazyload="" src="/images/loading.svg" data-src="/2024/02/29/%E5%88%86%E7%BB%84%E5%AF%86%E7%A0%81-AES/format,png-17090177948337.png" class="" title="aes_struct">

<center>加解密流程</center>

<h5 id="加解密步骤分析"><a href="#加解密步骤分析" class="headerlink" title="加解密步骤分析"></a>加解密步骤分析</h5><p>字节替换</p>
<p>AES的字节替换其实就是通过一个简单的查表操作来进行非线性运算。AES定义了一个S盒和一个逆S盒。分别用来加解密操作。</p>
<img lazyload="" src="/images/loading.svg" data-src="/2024/02/29/%E5%88%86%E7%BB%84%E5%AF%86%E7%A0%81-AES/%E5%9B%BE%E7%89%87-22-1024x703.png" class="" title="img">

<center>S盒</center>

<p>状态矩阵中的元素按照下面的方式映射为一个新的字节：把该字节的高4位作为行值，低4位作为列值，取出S盒或者逆S盒中对应的行的元素作为输出。例如，加密时输出的字节S1=0X12，则查找S盒的第0X01行和0X02列，得到值0XC9，然后替换S1原有的值0X12为0XC9。状态矩阵经字节代换后的图如下</p>
<img lazyload="" src="/images/loading.svg" data-src="/2024/02/29/%E5%88%86%E7%BB%84%E5%AF%86%E7%A0%81-AES/%E5%9B%BE%E7%89%87-23.png" class="" title="img">

<center>字节变换</center>

<p>逆字节代换也就是查逆S盒来变换，逆S盒如下</p>
<img lazyload="" src="/images/loading.svg" data-src="/2024/02/29/%E5%88%86%E7%BB%84%E5%AF%86%E7%A0%81-AES/%E5%9B%BE%E7%89%87-24-1024x704.png" class="" title="img">

<center>逆S盒</center>

<h5 id="行移位"><a href="#行移位" class="headerlink" title="行移位"></a>行移位</h5><p>行移位是一个简单的左循环移位操作。当密钥长度为128bit时，状态矩阵的第0行左移0字节，第1行左移1字节，第2行左移2字节。。。如下图所示</p>
<img lazyload="" src="/images/loading.svg" data-src="/2024/02/29/%E5%88%86%E7%BB%84%E5%AF%86%E7%A0%81-AES/%E5%9B%BE%E7%89%87-25.png" class="" title="img">

<center>行移位</center>

<p>行移位的逆变换是将状态矩阵中的每一行执行相反的移位操作，例如AES-128中，状态矩阵的第0行右移0字节，第1行右移1字节，第2行右移2字节。。。</p>
<h5 id="列混合"><a href="#列混合" class="headerlink" title="列混合"></a>列混合</h5><p>列混合变换是通过矩阵相乘来实现的，经行移位后的状态矩阵与固定的矩阵相乘，得到混淆后的状态矩阵，如下图的公式所示</p>
<img lazyload="" src="/images/loading.svg" data-src="/2024/02/29/%E5%88%86%E7%BB%84%E5%AF%86%E7%A0%81-AES/%E5%9B%BE%E7%89%87-26.png" class="" title="img">

<center>列混合</center>

<p>状态矩阵中的第j列(0 ≤j≤3)的列混合可以表示为下图所示</p>
<img lazyload="" src="/images/loading.svg" data-src="/2024/02/29/%E5%88%86%E7%BB%84%E5%AF%86%E7%A0%81-AES/%E5%9B%BE%E7%89%87-27.png" class="" title="img">

<p>其中，矩阵运算的乘法和加法都是定义在基于GF(2^8)上的二元运算，并不是通常意义上的乘法和加法。</p>
<p>逆向列混合变换同样可由下图的矩阵乘法定义</p>
<img lazyload="" src="/images/loading.svg" data-src="/2024/02/29/%E5%88%86%E7%BB%84%E5%AF%86%E7%A0%81-AES/%E5%9B%BE%E7%89%87-28.png" class="" title="img">

<center>逆列混合</center>

<h5 id="轮密钥加"><a href="#轮密钥加" class="headerlink" title="轮密钥加"></a>轮密钥加</h5><p>轮密钥加是将128位轮密钥Ki同状态矩阵中的数据进行逐位异或操作，如下图所示。其中，密钥Ki中每个字W[4i],W[4i+1],W[4i+2],W[4i+3]为32位bit字，包含4个字节，轮密钥加过程可以看成是字逐位异或的结果，也可以看成字节级别或者位级别的操作。也就是说，可以看成S0、S1、S2、S3组成的32位字与W[4i]的异或运算。</p>
<img lazyload="" src="/images/loading.svg" data-src="/2024/02/29/%E5%88%86%E7%BB%84%E5%AF%86%E7%A0%81-AES/%E5%9B%BE%E7%89%87-29.png" class="" title="img">

<center>轮密钥加</center>

<h5 id="密钥扩展"><a href="#密钥扩展" class="headerlink" title="密钥扩展"></a>密钥扩展</h5><p>AES首先将初始密钥输入到一个4×4的状态矩阵中，如下图所示</p>
<img lazyload="" src="/images/loading.svg" data-src="/2024/02/29/%E5%88%86%E7%BB%84%E5%AF%86%E7%A0%81-AES/%E5%9B%BE%E7%89%87-30.png" class="" title="img">

<center>密钥扩展</center>

<p>4×4矩阵的每一列的4个字节组成一个字，矩阵4列的4个字依次命名为W[0]、W[1]、W[2]、W[3]，它们构成一个以字为单位的数组W。</p>
<p>接着，对W数组扩充40个新列，构成总共44列的扩展密钥数组。新列一如下的递归方式产生</p>
<ol>
<li><p>如果i不是4的倍数，那么i列由如下等式确定：</p>
<p>$W[i]=W[i-4]⨁W[i-1]$</p>
</li>
<li><p>如果i是4的倍数，那么第i列由如下等式确定：</p>
<p>$W[i]=W[i-4]⨁T(W[i-1])$</p>
</li>
</ol>
<p>T是一个有点复杂的函数，由3部分组成：自循环、字节代换和轮常量异或，这3部分的作用分别如下</p>
<ol>
<li>字循环：将1个字中的4个字节循环左移一个字节。即将输入字[b0, b1, b2, b3]变换成[b1,b2,b3,b0]</li>
<li>字节代换：对字循环的结果使用S盒进行字节代换</li>
<li>轮常量异或：将前两步的结果同轮常量Rcon[j]进行异或，其中j表示轮数</li>
</ol>
<p>轮常量Rcon[j]是一个字，其值见下表</p>
<table>
<thead>
<tr>
<th>j</th>
<th>1</th>
<th>2</th>
<th>3</th>
<th>4</th>
<th>5</th>
</tr>
</thead>
<tbody><tr>
<td>Rcon[j]</td>
<td>01 00 00 00</td>
<td>02 00 00 00</td>
<td>04 00 00 00</td>
<td>08 00 00 00</td>
<td>10 00 00 00</td>
</tr>
<tr>
<td>j</td>
<td>6</td>
<td>7</td>
<td>8</td>
<td>9</td>
<td>10</td>
</tr>
<tr>
<td>Rcon[j]</td>
<td>20 00 00 00</td>
<td>40 00 00 00</td>
<td>80 00 00 00</td>
<td>1B 00 00 00</td>
<td>36 00 00 00</td>
</tr>
</tbody></table>
<center>轮常量Rcon[j]</center>

<p>总的来说，密钥扩展的复杂性是确保算法安全性的重要部分。当分组长度和密钥长度都是128bit时，AES的加密算法共迭代10轮，每一轮最后要与一个子密钥进行轮密钥加，再加上最开始的一次轮密钥加，即一个分组共需要扩展为11个128bit的轮密钥。AES的密钥扩展算法是以字节为一个基本单位（一个字为4个字节），刚好是密钥矩阵的一列。因此4个字（128bit）密钥需要扩展成11个子密钥，共44个字。</p>
<h2 id="AES-hook"><a href="#AES-hook" class="headerlink" title="AES hook"></a>AES hook</h2><h5 id="对java层的AES进行hook"><a href="#对java层的AES进行hook" class="headerlink" title="对java层的AES进行hook"></a>对java层的AES进行hook</h5><p>编写hook脚本通过参数以及返回值获取到加解密前后以及key的值</p>
<pre><code class="js">package com.xiaoeryu.aes;

import android.os.Build;

import java.io.UnsupportedEncodingException;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import java.util.Base64;

import javax.crypto.BadPaddingException;
import javax.crypto.Cipher;
import javax.crypto.IllegalBlockSizeException;
import javax.crypto.NoSuchPaddingException;
import javax.crypto.spec.SecretKeySpec;

public class AES {
    public static String encrypt(String content, String sKey) throws UnsupportedEncodingException, NoSuchPaddingException, NoSuchAlgorithmException, InvalidKeyException, IllegalBlockSizeException, BadPaddingException {
        if (sKey == null) {
            System.out.print("Key is null");
            return null;
        }
        // Determine the key length
        if (sKey.length() != 16) {
            System.out.print("Key length is not 16");
            return null;
        }
        byte[] raw = sKey.getBytes("utf-8");
        SecretKeySpec skeySpec = new SecretKeySpec(raw, "AES");
        Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding"); // "算法/模式/补码方式"
        cipher.init(Cipher.ENCRYPT_MODE, skeySpec);
        byte[] encrypted = cipher.doFinal(content.getBytes("utf-8"));
        String result = null;
        if (Build.VERSION.SDK_INT &gt;= Build.VERSION_CODES.O) {
            result = Base64.getEncoder().encodeToString(encrypted);
        } else {
            result = android.util.Base64.encodeToString(encrypted, android.util.Base64.DEFAULT);
        }
        return result;
    }
    public static String decrypt(String content, String sKey) throws UnsupportedEncodingException, NoSuchPaddingException, NoSuchAlgorithmException, InvalidKeyException, IllegalBlockSizeException, BadPaddingException {
        if (sKey == null) {
            System.out.print("Key is null");
            return null;
        }
        if  (sKey.length() != 16) {
            System.out.print("Key length is not 16");
            return null;
        }
        byte[] raw = sKey.getBytes("utf-8");
        SecretKeySpec skeySpec = new SecretKeySpec(raw, "AES");
        Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding");
        cipher.init(Cipher.DECRYPT_MODE, skeySpec);
        byte[] encrypted = android.util.Base64.decode(content, android.util.Base64.DEFAULT);
        byte[] original = cipher.doFinal(encrypted);
        String originalString = new String(original, "utf-8");
        return originalString;
    }
}
</code></pre>
<ul>
<li>对java层的AES进行hook跟之前hook DES使用的方法基本都是一样的，区别只是在于它们实现的时候调用的方法不同而已。所以相同的代码更改一下hook的函数和重载就可以了</li>
</ul>
<h5 id="定位SO中的AES算法"><a href="#定位SO中的AES算法" class="headerlink" title="定位SO中的AES算法"></a>定位SO中的AES算法</h5><p>跟之前一样，使用findcrypt插件直接就可以根据S盒定位到算法的位置，如果定位不到可能是因为插件中没有S盒的特征跟上一章同样的方法添加进去即可。</p>
<img lazyload="" src="/images/loading.svg" data-src="/2024/02/29/%E5%88%86%E7%BB%84%E5%AF%86%E7%A0%81-AES/image-20240228231505592.png" class="" title="image-20240228231505592">

<img lazyload="" src="/images/loading.svg" data-src="/2024/02/29/%E5%88%86%E7%BB%84%E5%AF%86%E7%A0%81-AES/image-20240228231548507.png" class="" title="image-20240228231548507">

<ul>
<li>通过交叉引用定位到调用S盒的函数</li>
</ul>
<img lazyload="" src="/images/loading.svg" data-src="/2024/02/29/%E5%88%86%E7%BB%84%E5%AF%86%E7%A0%81-AES/image-20240228231743503.png" class="" title="image-20240228231743503">

<ul>
<li>跟进去分析</li>
</ul>
<img lazyload="" src="/images/loading.svg" data-src="/2024/02/29/%E5%88%86%E7%BB%84%E5%AF%86%E7%A0%81-AES/image-20240228232341555.png" class="" title="image-20240228232341555">

<img lazyload="" src="/images/loading.svg" data-src="/2024/02/29/%E5%88%86%E7%BB%84%E5%AF%86%E7%A0%81-AES/image-20240229113043350.png" class="" title="image-20240229113043350">

<p>跟据汇编代码可知，这里是根据在获取S盒的值</p>
<h6 id="附件："><a href="#附件：" class="headerlink" title="附件："></a>附件：</h6><p>定位SO中AES算法的<a class="link" target="_blank" rel="noopener" href="https://github.com/xiaoeeyu/native-aes-demo">测试demo<i class="fa-solid fa-arrow-up-right ml-[0.2em] font-light align-text-top text-[0.7em] link-icon"></i></a></p>

		</div>

		
		<div class="post-copyright-info w-full my-8 px-2 sm:px-6 md:px-8">
			<div class="article-copyright-info-container">
    <ul>
        <li><strong>标题:</strong> 分组密码-AES</li>
        <li><strong>作者:</strong> xiaoeryu</li>
        <li><strong>创建于
                :</strong> 2024-02-29 11:05:35</li>
        
            <li>
                <strong>更新于
                    :</strong> 2024-03-01 18:01:29
            </li>
        
        <li>
            <strong>链接:</strong> https://github.com/xiaoeryu/2024/02/29/分组密码-AES/
        </li>
        <li>
            <strong>
                版权声明:
            </strong>
            

            
                本文章采用 <a class="license" target="_blank" rel="noopener" href="https://creativecommons.org/licenses/by-nc-sa/4.0">CC BY-NC-SA 4.0</a> 进行许可。
            
        </li>
    </ul>
</div>

		</div>
		

		
		<ul class="post-tags-box text-lg mt-1.5 flex-wrap justify-center flex md:hidden">
			
			<li class="tag-item mx-0.5">
				<a href="/tags/Frida-Hook/">#Frida Hook</a>&nbsp;
			</li>
			
			<li class="tag-item mx-0.5">
				<a href="/tags/AES/">#AES</a>&nbsp;
			</li>
			
		</ul>
		

		

		
		<div class="article-nav my-8 flex justify-between items-center px-2 sm:px-6 md:px-8">
			
			<div class="article-prev border-border-color shadow-redefine-flat shadow-shadow-color-2 rounded-medium px-4 py-2 hover:shadow-redefine-flat-hover hover:shadow-shadow-color-2">
				<a class="prev" rel="prev" href="/2024/03/02/%E5%88%86%E7%BB%84%E5%AF%86%E7%A0%81%E7%9A%84%E5%A1%AB%E5%85%85%E5%8F%8A%E5%B7%A5%E4%BD%9C%E6%A8%A1%E5%BC%8F/">
					<span class="left arrow-icon flex justify-center items-center">
						<i class="fa-solid fa-chevron-left"></i>
					</span>
					<span class="title flex justify-center items-center">
						<span class="post-nav-title-item">分组密码的填充及工作模式</span>
						<span class="post-nav-item">上一篇</span>
					</span>
				</a>
			</div>
			
			
			<div class="article-next border-border-color shadow-redefine-flat shadow-shadow-color-2 rounded-medium px-4 py-2 hover:shadow-redefine-flat-hover hover:shadow-shadow-color-2">
				<a class="next" rel="next" href="/2024/02/23/%E5%88%86%E7%BB%84%E5%AF%86%E7%A0%81-DES/">
					<span class="title flex justify-center items-center">
						<span class="post-nav-title-item">分组密码-DES</span>
						<span class="post-nav-item">下一篇</span>
					</span>
					<span class="right arrow-icon flex justify-center items-center">
						<i class="fa-solid fa-chevron-right"></i>
					</span>
				</a>
			</div>
			
		</div>
		


		
		<div class="comment-container px-2 sm:px-6 md:px-8 pb-8">
			<div class="comments-container mt-10 w-full ">
    <div id="comment-anchor" class="w-full h-2.5"></div>
    <div class="comment-area-title w-full my-1.5 md:my-2.5 text-xl md:text-3xl font-bold">
        评论
    </div>
    

        
            


        
    
</div>

		</div>
		
	</div>

	
	<div class="toc-content-container">
		<div class="post-toc-wrap">
	<div class="post-toc">
		<div class="toc-title">目录</div>
		<div class="page-title">分组密码-AES</div>
		<ol class="nav"><li class="nav-item nav-level-2"><a class="nav-link" href="#AES%E5%8A%A0%E8%A7%A3%E5%AF%86%E7%90%86%E8%AE%BA"><span class="nav-text">AES加解密理论</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#AES%E7%AE%97%E6%B3%95%E6%B5%81%E7%A8%8B%E5%88%86%E6%9E%90"><span class="nav-text">AES算法流程分析</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#AES-hook"><span class="nav-text">AES hook</span></a></li></ol>

	</div>
</div>
	</div>
	
</div>
			</div>

			
		</div>

		<div class="main-content-footer">
			<footer class="footer mt-5 py-5 h-auto text-base text-third-text-color relative border-t-2 border-t-border-color">
    <div class="info-container py-3 text-center">
        
        <div class="text-center">
            &copy;
            
              <span>2022</span>
              -
            
            2025&nbsp;&nbsp;<i class="fa-solid fa-heart fa-beat" style="--fa-animation-duration: 0.5s; color: #f54545"></i>&nbsp;&nbsp;<a href="/">xiaoeryu</a>
            
                
                <p class="post-count space-x-0.5">
                    <span>
                        共撰写了 112 篇文章
                    </span>
                    
                </p>
            
        </div>
        
            <script data-swup-reload-script src="https://busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>
            <div class="relative text-center lg:absolute lg:right-[20px] lg:top-1/2 lg:-translate-y-1/2 lg:text-right">
                
                    <span id="busuanzi_container_site_uv" class="lg:!block">
                        <span class="text-sm">访问人数</span>
                        <span id="busuanzi_value_site_uv"></span>
                    </span>
                
                
                    <span id="busuanzi_container_site_pv" class="lg:!block">
                        <span class="text-sm">总访问量</span>
                        <span id="busuanzi_value_site_pv"></span>
                    </span>
                
            </div>
        
        <div class="relative text-center lg:absolute lg:left-[20px] lg:top-1/2 lg:-translate-y-1/2 lg:text-left">
            <span class="lg:block text-sm">由 <?xml version="1.0" encoding="utf-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="relative top-[2px] inline-block align-baseline" version="1.1" id="圖層_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="1rem" height="1rem" viewBox="0 0 512 512" enable-background="new 0 0 512 512" xml:space="preserve"><path fill="#0E83CD" d="M256.4,25.8l-200,115.5L56,371.5l199.6,114.7l200-115.5l0.4-230.2L256.4,25.8z M349,354.6l-18.4,10.7l-18.6-11V275H200v79.6l-18.4,10.7l-18.6-11v-197l18.5-10.6l18.5,10.8V237h112v-79.6l18.5-10.6l18.5,10.8V354.6z"/></svg><a target="_blank" class="text-base" href="https://hexo.io">Hexo</a> 驱动</span>
            <span class="text-sm lg:block">主题&nbsp;<a class="text-base" target="_blank" href="https://github.com/EvanNotFound/hexo-theme-redefine">Redefine v2.8.2</a></span>
        </div>
        
        
            <div>
                博客已运行 <span class="odometer" id="runtime_days" ></span> 天 <span class="odometer" id="runtime_hours"></span> 小时 <span class="odometer" id="runtime_minutes"></span> 分钟 <span class="odometer" id="runtime_seconds"></span> 秒
            </div>
        
        
            <script data-swup-reload-script>
                try {
                    function odometer_init() {
                    const elements = document.querySelectorAll('.odometer');
                    elements.forEach(el => {
                        new Odometer({
                            el,
                            format: '( ddd).dd',
                            duration: 200
                        });
                    });
                    }
                    odometer_init();
                } catch (error) {}
            </script>
        
        
        
    </div>  
</footer>
		</div>
	</div>

	
	<div class="post-tools">
		<div class="post-tools-container">
	<ul class="article-tools-list">
		<!-- TOC aside toggle -->
		
		<li class="right-bottom-tools page-aside-toggle">
			<i class="fa-regular fa-outdent"></i>
		</li>
		

		<!-- go comment -->
		
		<li class="go-comment">
			<i class="fa-regular fa-comments"></i>
		</li>
		
	</ul>
</div>
	</div>
	

	<div class="right-side-tools-container">
		<div class="side-tools-container">
	<ul class="hidden-tools-list">
		<li class="right-bottom-tools tool-font-adjust-plus flex justify-center items-center">
			<i class="fa-regular fa-magnifying-glass-plus"></i>
		</li>

		<li class="right-bottom-tools tool-font-adjust-minus flex justify-center items-center">
			<i class="fa-regular fa-magnifying-glass-minus"></i>
		</li>

		<li class="right-bottom-tools tool-dark-light-toggle flex justify-center items-center">
			<i class="fa-regular fa-moon"></i>
		</li>

		<!-- rss -->
		

		

		<li class="right-bottom-tools tool-scroll-to-bottom flex justify-center items-center">
			<i class="fa-regular fa-arrow-down"></i>
		</li>
	</ul>

	<ul class="visible-tools-list">
		<li class="right-bottom-tools toggle-tools-list flex justify-center items-center">
			<i class="fa-regular fa-cog fa-spin"></i>
		</li>
		
		<li class="right-bottom-tools tool-scroll-to-top flex justify-center items-center">
			<i class="arrow-up fas fa-arrow-up"></i>
			<span class="percent"></span>
		</li>
		
		
	</ul>
</div>
	</div>

	<div class="image-viewer-container">
	<img src="">
</div>

	
	<div class="search-pop-overlay">
	<div class="popup search-popup">
		<div class="search-header">
			<span class="search-input-field-pre">
				<i class="fa-solid fa-keyboard"></i>
			</span>
			<div class="search-input-container">
				<input autocomplete="off" autocorrect="off" autocapitalize="off" placeholder="站内搜索您需要的内容..." spellcheck="false" type="search" class="search-input">
			</div>
			<span class="popup-btn-close">
				<i class="fa-solid fa-times"></i>
			</span>
		</div>
		<div id="search-result">
			<div id="no-result">
				<i class="fa-solid fa-spinner fa-spin-pulse fa-5x fa-fw"></i>
			</div>
		</div>
	</div>
</div>
	

</main>



<script src="/js/build/libs/Swup.min.js"></script>

<script src="/js/build/libs/SwupSlideTheme.min.js"></script>

<script src="/js/build/libs/SwupScriptsPlugin.min.js"></script>

<script src="/js/build/libs/SwupProgressPlugin.min.js"></script>

<script src="/js/build/libs/SwupScrollPlugin.min.js"></script>

<script src="/js/build/libs/SwupPreloadPlugin.min.js"></script>

<script>
    const swup = new Swup({
        plugins: [
            new SwupScriptsPlugin({
                optin: true,
            }),
            new SwupProgressPlugin(),
            new SwupScrollPlugin({
                offset: 80,
            }),
            new SwupSlideTheme({
                mainElement: ".main-content-body",
            }),
            new SwupPreloadPlugin(),
        ],
        containers: ["#swup"],
    });
</script>




	
<script src="/js/build/tools/imageViewer.js" type="module"></script>

<script src="/js/build/utils.js" type="module"></script>

<script src="/js/build/main.js" type="module"></script>

<script src="/js/build/layouts/navbarShrink.js" type="module"></script>

<script src="/js/build/tools/scrollTopBottom.js" type="module"></script>

<script src="/js/build/tools/lightDarkSwitch.js" type="module"></script>

<script src="/js/build/layouts/categoryList.js" type="module"></script>



    
<script src="/js/build/tools/localSearch.js" type="module"></script>




    
<script src="/js/build/tools/codeBlock.js" type="module"></script>




    
<script src="/js/build/layouts/lazyload.js" type="module"></script>




    
<script src="/js/build/tools/runtime.js"></script>

    
<script src="/js/build/libs/odometer.min.js"></script>

    
<link rel="stylesheet" href="/assets/odometer-theme-minimal.css">




  
<script src="/js/build/libs/Typed.min.js"></script>

  
<script src="/js/build/plugins/typed.js" type="module"></script>








    
<script src="/js/build/libs/anime.min.js"></script>





    
<script src="/js/build/tools/tocToggle.js" type="module" data-swup-reload-script=""></script>

<script src="/js/build/layouts/toc.js" type="module" data-swup-reload-script=""></script>

<script src="/js/build/plugins/tabs.js" type="module" data-swup-reload-script=""></script>




<script src="/js/build/libs/moment-with-locales.min.js" data-swup-reload-script=""></script>


<script src="/js/build/layouts/essays.js" type="module" data-swup-reload-script=""></script>





	
</body>

</html>